<?php
function smarty_function_browse_age($params, &$smarty) {
	if( !isset( $params["selected_age"])) {
		$params["selected_age"] = 0;
	}
	
	$select = SilkForm::create_input_select(array("name" => "age"));
	$items = $params["ages"];
	$select .= SilkForm::create_input_options(array("items" => $items, "selected_index" => $params["selected_age"]));
	$select .= SilkForm::create_end_tag("select");
	return $select;
}
?>